<html>
<script type="text/javascript" src="<?=base_url().'resource/js/jquery.min.js'?>" ></script>
<script>
    function tijiao(){
        var name=$('#name').val();
        var url=$('#url').val();
        if(name==''){
            alert("申请人姓名不能为空！");
            return false;
        }
        if(url==''){
            alert("申请URL不能为空！");
            return false;
        }
    }
</script>
<style>
    tr{
        display:block; /*将tr设置为块体元素*/
        margin:15px 0;  /*设置tr间距为2px*/
    }
</style>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
    <body>
    <div style="height:300px;width:400px;border:1px solid #FF0099;margin-left: auto;margin-right: auto;margin-top: 150px;">
        <form action="<?=blang_url('maintainApi/Apiapplication/addapiapplication')?>" method="post">
            <table style="margin-left: auto;margin-right: auto;margin-top: 20px;" >
                <tr align="center">
                    <td colspan="2" ><h2>Pandawill维修系统API申请</h2></td>
                </tr>
                <tr align="left">
                    <td>申请人：</td>
                    <td><input type="text" id="name" name="name"></td>
                </tr>
                <tr align="left">
                    <td>申请URL：</td>
                    <td><input type="text" id="url" name="url" placeholder="请输入你网站的根目录"></td>
                </tr>
                <tr align="left">
                    <td>申请API：</td>
                    <td><select id="apitype" name="apitype">
                            <?php foreach($typelist as $row):?>
                            <option value="<?=$row['typename_en']?>"><?=$row['typename']?></option>
                            <?php endforeach;?>
                        </select>
                    </td>
                </tr>
                <tr align="center">
                    <td colspan="2"><input type="submit" onclick="return tijiao()" value="提交申请"></td>
                </tr>
                <tr>
                    <td><?=$msg?></td>
                </tr>
            </table>
        </form>
    </div>
    </body>
</html>